#ifndef CCOMMONDCBBUILDER_H_
#define CCOMMONDCBBUILDER_H_

#include "IDeviceBuilder.h"

class IBaseDatalink;
class ICommonDCBTransport;
class IDoorControlBoard;

namespace zl
{
namespace zlbase
{

/// \brief 通用开门板创建者类
/// 
/// 根据用户输入的参数创建开门板实例对象，用于隐藏详细的创建过程
class CCommonDCBBuilder : public IDoorControlBoardBuilder
{
public:
    CCommonDCBBuilder() = default;
    ~CCommonDCBBuilder() = default;

    std::shared_ptr<IDoorControlBoard> Concreate(const DeviceOption& option) override;

protected:
    std::shared_ptr<IBaseDatalink> build_datalink(const DeviceOption& option);
    std::shared_ptr<ICommonDCBTransport> build_transport(const DeviceOption& option);
    std::shared_ptr<IDoorControlBoard> build_device(const DeviceOption& option);
};

} // namespace zlbase
} // namespace zl

#endif // CCOMMONDCBBUILDER_H_